//
//  QInfoManageCell.m
//  QoilPublic
//
//  Created by 杨凯 on 2017/2/17.
//  Copyright © 2017年 杨凯. All rights reserved.
//

#import "QInfoManageCell.h"
@interface QInfoManageCell()
@property (weak, nonatomic) IBOutlet UILabel *nameLab;
@property (weak, nonatomic) IBOutlet UIImageView *invoiceImg;
@property (weak, nonatomic) IBOutlet UILabel *addressLab;
@property (weak, nonatomic) IBOutlet UIImageView *checkImg;
@property (weak, nonatomic) IBOutlet UILabel *checkLab;
@property (weak, nonatomic) IBOutlet UIButton *editBtn;

@end
@implementation QInfoManageCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)setModel:(QInvoiceListModel *)model{
    _model =model;
    _nameLab.text =_model.receiveName;
    if ([_model.invoiceType isEqualToString:@"1"]) {
        _invoiceImg.image =[UIImage imageNamed:@"Invoice_common"];
    }else{
        _invoiceImg.image =[UIImage imageNamed:@"Invoice_special"];
    }
    _addressLab.text =_model.receiveAddress;
    if ([_model.state isEqualToString:@"0"]) {
        //审核中
        _checkImg.image = [UIImage imageNamed:@"Invoice_checking"];
        _editBtn.hidden = YES;

    }else if ([_model.state isEqualToString:@"1"]){
        //审核通过
        _checkImg.image = [UIImage imageNamed:@"invoice_pass"];
        _editBtn.hidden = YES;

    }else{
        //审核未通过
        _checkImg.image = [UIImage imageNamed:@"invoice_unpass"];
        _editBtn.hidden = NO;
    }
    
}
- (IBAction)changeAction:(UIButton *)sender {
    if (self.ChangeBlock) {
        self.ChangeBlock(sender.tag);
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
